package cn.ibizlab.odoo.core.odoo_fleet.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.odoo.util.domain.EntityBase;
import cn.ibizlab.odoo.util.annotation.DEField;
import cn.ibizlab.odoo.util.enums.DEPredefinedFieldType;
import cn.ibizlab.odoo.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.Data;
import org.springframework.data.annotation.Transient;

import cn.ibizlab.odoo.util.domain.EntityClient;

/**
 * ServiceApi [车辆相关的费用] 对象
 */
@Data
public class Fleet_vehicle_cost extends EntityClient implements Serializable {

    /**
     * 最后修改日
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "__last_update" , format="yyyy-MM-dd HH:mm:ss")
    @JsonProperty("__last_update")
    private Timestamp LastUpdate;

    /**
     * 总价
     */
    @JSONField(name = "amount")
    @JsonProperty("amount")
    private Double amount;

    /**
     * 显示名称
     */
    @JSONField(name = "display_name")
    @JsonProperty("display_name")
    private String displayName;

    /**
     * 创建时间
     */
    @DEField(name = "create_date" , preType = DEPredefinedFieldType.CREATEDATE)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "create_date" , format="yyyy-MM-dd HH:mm:ss")
    @JsonProperty("create_date")
    private Timestamp createDate;

    /**
     * 里程表数值
     */
    @JSONField(name = "odometer")
    @JsonProperty("odometer")
    private Double odometer;

    /**
     * ID
     */
    @DEField(isKeyField=true)
    @JSONField(name = "id")
    @JsonProperty("id")
    private Integer id;

    /**
     * 最后更新时间
     */
    @DEField(name = "write_date" , preType = DEPredefinedFieldType.UPDATEDATE)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "write_date" , format="yyyy-MM-dd HH:mm:ss")
    @JsonProperty("write_date")
    private Timestamp writeDate;

    /**
     * 费用所属类别
     */
    @DEField(name = "cost_type")
    @JSONField(name = "cost_type")
    @JsonProperty("cost_type")
    private String costType;

    /**
     * 成本说明
     */
    @JSONField(name = "description")
    @JsonProperty("description")
    private String description;

    /**
     * 自动生成
     */
    @DEField(name = "auto_generated")
    @JSONField(name = "auto_generated")
    @JsonProperty("auto_generated")
    private String autoGenerated;

    /**
     * 日期
     */
    @JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
    @JSONField(name = "date" , format="yyyy-MM-dd")
    @JsonProperty("date")
    private Timestamp date;

    /**
     * 包括服务
     */
    @JSONField(name = "cost_ids")
    @JsonProperty("cost_ids")
    private String costIds;

    /**
     * 合同
     */
    @JSONField(name = "contract_id_text")
    @JsonProperty("contract_id_text")
    private String contractIdText;

    /**
     * 名称
     */
    @JSONField(name = "name")
    @JsonProperty("name")
    private String name;

    /**
     * 上级
     */
    @JSONField(name = "parent_id_text")
    @JsonProperty("parent_id_text")
    private String parentIdText;

    /**
     * 类型
     */
    @JSONField(name = "cost_subtype_id_text")
    @JsonProperty("cost_subtype_id_text")
    private String costSubtypeIdText;

    /**
     * 创建人
     */
    @JSONField(name = "create_uid_text")
    @JsonProperty("create_uid_text")
    private String createUidText;

    /**
     * 单位
     */
    @JSONField(name = "odometer_unit")
    @JsonProperty("odometer_unit")
    private String odometerUnit;

    /**
     * 里程表
     */
    @JSONField(name = "odometer_id_text")
    @JsonProperty("odometer_id_text")
    private String odometerIdText;

    /**
     * 最后更新人
     */
    @JSONField(name = "write_uid_text")
    @JsonProperty("write_uid_text")
    private String writeUidText;

    /**
     * 类型
     */
    @DEField(name = "cost_subtype_id")
    @JSONField(name = "cost_subtype_id")
    @JsonProperty("cost_subtype_id")
    private Integer costSubtypeId;

    /**
     * 合同
     */
    @DEField(name = "contract_id")
    @JSONField(name = "contract_id")
    @JsonProperty("contract_id")
    private Integer contractId;

    /**
     * 最后更新人
     */
    @DEField(name = "write_uid" , preType = DEPredefinedFieldType.UPDATEMAN)
    @JSONField(name = "write_uid")
    @JsonProperty("write_uid")
    private Integer writeUid;

    /**
     * 创建人
     */
    @DEField(name = "create_uid" , preType = DEPredefinedFieldType.CREATEMAN)
    @JSONField(name = "create_uid")
    @JsonProperty("create_uid")
    private Integer createUid;

    /**
     * 上级
     */
    @DEField(name = "parent_id")
    @JSONField(name = "parent_id")
    @JsonProperty("parent_id")
    private Integer parentId;

    /**
     * 车辆
     */
    @DEField(name = "vehicle_id")
    @JSONField(name = "vehicle_id")
    @JsonProperty("vehicle_id")
    private Integer vehicleId;

    /**
     * 里程表
     */
    @DEField(name = "odometer_id")
    @JSONField(name = "odometer_id")
    @JsonProperty("odometer_id")
    private Integer odometerId;


    /**
     * 
     */
    @JSONField(name = "odoocostsubtype")
    @JsonProperty("odoocostsubtype")
    private cn.ibizlab.odoo.core.odoo_fleet.domain.Fleet_service_type odooCostSubtype;

    /**
     * 
     */
    @JSONField(name = "odooparent")
    @JsonProperty("odooparent")
    private cn.ibizlab.odoo.core.odoo_fleet.domain.Fleet_vehicle_cost odooParent;

    /**
     * 
     */
    @JSONField(name = "odoocontract")
    @JsonProperty("odoocontract")
    private cn.ibizlab.odoo.core.odoo_fleet.domain.Fleet_vehicle_log_contract odooContract;

    /**
     * 
     */
    @JSONField(name = "odooodometer")
    @JsonProperty("odooodometer")
    private cn.ibizlab.odoo.core.odoo_fleet.domain.Fleet_vehicle_odometer odooOdometer;

    /**
     * 
     */
    @JSONField(name = "odoovehicle")
    @JsonProperty("odoovehicle")
    private cn.ibizlab.odoo.core.odoo_fleet.domain.Fleet_vehicle odooVehicle;

    /**
     * 
     */
    @JSONField(name = "odoocreate")
    @JsonProperty("odoocreate")
    private cn.ibizlab.odoo.core.odoo_base.domain.Res_users odooCreate;

    /**
     * 
     */
    @JSONField(name = "odoowrite")
    @JsonProperty("odoowrite")
    private cn.ibizlab.odoo.core.odoo_base.domain.Res_users odooWrite;




    /**
     * 设置 [总价]
     */
    public void setAmount(Double amount){
        this.amount = amount ;
        this.modify("amount",amount);
    }
    /**
     * 设置 [费用所属类别]
     */
    public void setCostType(String costType){
        this.costType = costType ;
        this.modify("cost_type",costType);
    }
    /**
     * 设置 [成本说明]
     */
    public void setDescription(String description){
        this.description = description ;
        this.modify("description",description);
    }
    /**
     * 设置 [自动生成]
     */
    public void setAutoGenerated(String autoGenerated){
        this.autoGenerated = autoGenerated ;
        this.modify("auto_generated",autoGenerated);
    }
    /**
     * 设置 [日期]
     */
    public void setDate(Timestamp date){
        this.date = date ;
        this.modify("date",date);
    }
    /**
     * 设置 [类型]
     */
    public void setCostSubtypeId(Integer costSubtypeId){
        this.costSubtypeId = costSubtypeId ;
        this.modify("cost_subtype_id",costSubtypeId);
    }
    /**
     * 设置 [合同]
     */
    public void setContractId(Integer contractId){
        this.contractId = contractId ;
        this.modify("contract_id",contractId);
    }
    /**
     * 设置 [上级]
     */
    public void setParentId(Integer parentId){
        this.parentId = parentId ;
        this.modify("parent_id",parentId);
    }
    /**
     * 设置 [车辆]
     */
    public void setVehicleId(Integer vehicleId){
        this.vehicleId = vehicleId ;
        this.modify("vehicle_id",vehicleId);
    }
    /**
     * 设置 [里程表]
     */
    public void setOdometerId(Integer odometerId){
        this.odometerId = odometerId ;
        this.modify("odometer_id",odometerId);
    }

}


